package com.yan.furns.web.servlet.notUsed;
import javax.servlet.http.HttpServlet;

/**
 * @author Yzb
 * @version 1.0
 */
public class RegisterServlet extends HttpServlet {
//	MemberService memberService = new MemberServiceImpl();
//	@Override
//	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
////		System.out.println("RegisterServlet doPost");
//		String username = req.getParameter("username");
//		String password = req.getParameter("password");
//		String email = req.getParameter("email");
//
//
//		if (!memberService.existUsername(username)) {
//		Member member = new Member(null, username, password, email, null);
////			System.out.println("用户名可用~");
//			if (memberService.registerMember(member)) {
////				System.out.println("注册成功~~");
//				req.getRequestDispatcher("/views/member/register_ok.jsp")
//						.forward(req, resp);
//			} else {
////				System.out.println("注册error!");
//				req.getRequestDispatcher("/views/member/register_fail.jsp")
//						.forward(req, resp);
//			}
//		} else {
////			System.out.println("用户" + username + "已存在, 不可以注册");
//			req.getRequestDispatcher("/views/member/login.jsp")
//					.forward(req, resp);
//		}
//	}
//
//	@Override
//	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//		doPost(req, resp);
//	}
}
